﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Bank.aspx.cs" Inherits="Bank" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>

<asp:Content ID="ClassifiersContnet" ContentPlaceHolderID="MainContent" Runat="Server">

    <asp:UpdatePanel runat="server">
        <ContentTemplate>

            <asp:Panel ID="allListPanel" runat="server" Visible="False">
                <asp:Button ID="newButton" runat="server" Text="Adauga nou" Width="230px"  onclick="newButton_Click">
                </asp:Button>
                <hr />
                <asp:GridView ID="listGridView" runat="server" 
                        EnableModelValidation="True" 
                        AutoGenerateColumns="False" 
                        CssClass="mGrid"
                        PagerStyle-CssClass="pgr"
                        AlternatingRowStyle-CssClass="alt"
                        AllowPaging="True"         
                        PageSize="4" 
                        onrowediting="listGridView_RowEditing" 
                        onpageindexchanging="listGridView_PageIndexChanging" 
                        onrowdeleting="listGridView_RowDeleting" >
                    <Columns>
                        <asp:BoundField DataField="BankID"       HeaderText="Bank ID"          HtmlEncode="False"   HeaderStyle-CssClass="HiddenColumn" ItemStyle-CssClass = "HiddenColumn"  />
                        <asp:BoundField DataField="Name"          HeaderText="Name"             HtmlEncode="False" />
                        <asp:BoundField DataField="IBAN"    HeaderText="IBAN"   HtmlEncode="false" />
                        <asp:BoundField DataField="CorespondentAccount"    HeaderText="Corespondent Account"   HtmlEncode="false" />
                        <asp:ButtonField ButtonType="Button" ControlStyle-CssClass="buttonBlue" CommandName="Edit" Text="Edit" />
                        <asp:TemplateField HeaderText="Delete">
                            <ItemTemplate>
                                    <asp:Button ID="deleteButton" runat="server" CommandName="Delete" Text="Delete" OnClientClick="return confirm('Sunteti sigur ca vreti sa stergeti?');" />
                            </ItemTemplate>
                        </asp:TemplateField>  
                    </Columns>
                </asp:GridView>
            </asp:Panel>

            <asp:Panel ID="addNewEntryPanel" runat="server" Visible="False" >
                <div class="module">
                    <div class="moduleHeader">Nou</div>
                    <div class="module_content">
                        <p>
                            <label> Nume: </label>
                            <asp:TextBox ID="addNewTextBox" runat="server"></asp:TextBox>
                        </p>
                        <p>
                            <label>IBAN:</label>
                            <asp:TextBox ID="ibanTextBox" runat="server"></asp:TextBox>
                        </p>
                        <p>
                            <label>Cont corespondent:</label>
                            <asp:TextBox ID="correspondentAccountTextBox" runat="server"></asp:TextBox>
                        </p>
                        <asp:Button ID="addNewSaveButton"  runat="server" Text="Save" onclick="addNewSaveButton_Click"   />
                        <asp:Button ID="addNewCancelButton" runat="server" Text="Cancel"  onclick="addNewCancelButton_Click"  />
                    </div>
                </div>
            </asp:Panel>

            <asp:Panel ID="editEntryPanel" runat="server" Visible="False">
                <div class="module">
                    <div class="moduleHeader">Modific</div>
                    <div class="module_content">
                        <p>
                            <label>ID:</label>
                            <asp:Label ID="bankIDLabel" runat="server" Text="entry ID: " ></asp:Label>
                        </p>
                        <p>
                            <label>Nume: </label>
                            <asp:TextBox ID="editNameTextBox" runat="server" ></asp:TextBox>
                        </p>
                        <p>
                            <label>IBAN:</label>
                            <asp:TextBox ID="editIBANTextBox" runat="server"></asp:TextBox>
                        </p>
                        <p>
                            <label>Cont corespondent:</label>
                            <asp:TextBox ID="editCorrespondentAcounttextBox" runat="server"></asp:TextBox>
                        </p>
                        <asp:Button ID="editSaveButton" runat="server" Text="Save" Width="100px" onclick="editSaveButton_Click"  />
                        <asp:Button ID="editCancelButton" runat="server" Text="Cancel" Width="100px" onclick="editCancelButton_Click"  />
                    </div>
                </div>
            </asp:Panel>

        </ContentTemplate>
    </asp:UpdatePanel>

</asp:Content>



